package com.modudf.persist;

import java.sql.Connection;

import com.modudf.common.JdbcUtil;
import com.modudf.domain.User;
import com.modudf.exception.ConnectiontException;

public class UserDaoImpl implements UserDao {
	
	public User loginUser(User user) {
		Connection conn = null;
		try {
			conn = JdbcUtil.getConnection(user.getUrl(), user.getUserName(), user.getPassword());
		} catch (ConnectiontException e) {
			throw e;
		}
		if (conn != null) {
			return user;
		} else {
			return null;
		}
	}

}
